
import Layout from '@/views/Layout'
import NotFound from '@/views/errorPage/404.vue'
const routes = [
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login.vue'),
        meat: {
            title: '登录'
        }
    },
    {
        name: 'layout',
        component: Layout,
        redirect: '/login',
        children: [
            {
                path: '/home',
                name: 'home',
                meta: {
                    title: '首页',
                    icon: 'icow icow-homeL'
                },
                // component: () => import('@/views/home/controlBooth/index.vue'),
                children: [
                    {
                        path: 'controlBooth',
                        name: 'controlBooth',
                        component: () => import('@/views/home/controlBooth/index'),
                        meta: {
                            title: '控制台'
                        }
                    }
                ]
            },
            {
                path: '/system',
                name: 'system',
                meta: {
                    title: '系统管理',
                    icon: 'icow icow-homeL'
                },
                children: [
                    {
                        path: 'role',
                        name: 'role',
                        component: () => import('../views/system/role.vue'),
                        meta: {
                            title: '角色管理'
                        },
                    },
                    {
                        path: 'administrators',
                        name: 'administrators',
                        component: () => import('../views/system/administrators.vue'),
                        meta: {
                            title: '管理员管理'
                        },
                    },
                    {
                        path: 'OperationLog',
                        name: 'OperationLog',
                        component: () => import('../views/system/OperationLog.vue'),
                        meta: {
                            title: '操作日志'
                        },
                    },
                    {
                        path: 'set',
                        name: 'set',
                        component: () => import('../views/system/set.vue'),
                        meta: {
                            title: '基础设置'
                        },
                    },
                ]

            },
            {
                path: '/device',
                name: 'device',
                meta: {
                    title: '设备管理',
                    icon: 'icow icow-cengji'
                },
                children: [
                    {
                        path: 'vendingMachine',
                        name: 'vendingMachine',
                        component: () => import('../views/device/vendingMachine.vue'),
                        meta: {
                            title: '售货机',
                        },
                    },
                    {
                        path: 'sim',
                        name: 'sim',
                        component: () => import('../views/device/sim.vue'),
                        meta: {
                            title: 'SIM卡'
                        },
                    },
                    {
                        path: 'log',
                        name: 'log',
                        component: () => import('../views/device/log.vue'),
                        meta: {
                            title: '日志'
                        },
                    }
                ]
            },
            {
                path: '/commodity',
                name: 'commodity',
                meta: {
                    title: '商品管理',
                    icon: 'icow icow-goods'
                },
                children: [
                    {
                        path: 'list',
                        name: 'list',
                        component: () => import('../views/commodity/list.vue'),
                        meta: {
                            title: '商品列表'
                        }
                    },
                    {
                        path: 'classification',
                        name: 'classification',
                        component: () => import('../views/commodity/classification.vue'),
                        meta: {
                            title: '商品分类'
                        }
                    },
                    {
                        path: 'myData',
                        name: 'myData',
                        component: () => import('../views/commodity/myData.vue'),
                        meta: {
                            title: '视觉商品'
                        }
                    }
                ]
            },
            {
                path: '/member',
                name: 'member',
                meta: {
                    title: '会员管理',
                    icon: 'icow icow-member'
                },
                children: [
                    {
                        path: 'memberList',
                        name: 'memberList',
                        component: () => import('../views/member/memberList.vue'),
                        meta: {
                            title: '会员列表'
                        }
                    },
                ]
            },
            {
                path: '/order',
                name: 'order',
                meta: {
                    title: '订单管理',
                    icon: 'icow icow-order',
                },
                children: [
                    {
                        path: 'orderList',
                        name: 'orderList',
                        component: () => import('../views/order/orderList.vue'),
                        meta: {
                            title: '订单列表',
                        },
                    },
                    {
                        path: 'status',
                        name: 'status',
                        component: () => import('../views/order/status.vue'),
                        meta: {
                            title: '维权列表'
                        },
                    }
                ]
            },
            {
                path: '/data',
                name: 'data',
                meta: {
                    title: '数据统计',
                    icon: 'icow icow-statistics'
                },
                children: [
                    {
                        path: 'goods',
                        name: 'goods',
                        component: () => import('../views/data/goods.vue'),
                        meta: {
                            title: '商品统计'
                        },
                    }
                ]
            },
            {
                path: '/business',
                name: 'business',
                meta: {
                    title: '商家管理',
                    icon: 'icow icow-statistics'
                },
                children: [
                    {
                        path: 'businessList',
                        name: 'businessList',
                        component: () => import('../views/business/list.vue'),
                        meta: {
                            title: '商家列表'
                        },
                    },
                    {
                        path: 'setup',
                        name: 'setup',
                        component: () => import('../views/business/setup.vue'),
                        meta: {
                            title: '设置'
                        },
                    },

                ]
            },
            {
                path: '/finance',
                name: 'finance',
                meta: {
                    title: '财务管理',
                    icon: 'icow icow-qiehuan'
                },
                children: [
                    {
                        path: 'FundDetails',
                        name: 'FundDetails',
                        component: () => import('../views/finance/FundDetails.vue'),
                        meta: {
                            title: '资金明细'
                        },
                    },
                    {
                        path: 'MerchantWithdrawal',
                        name: 'MerchantWithdrawal',
                        component: () => import('../views/finance/MerchantWithdrawal.vue'),
                        meta: {
                            title: '商家提现'
                        },
                    },
                    {
                        path: 'BankCard',
                        name: 'BankCard',
                        component: () => import('../views/finance/BankCard.vue'),
                        meta: {
                            title: '银行卡'
                        },
                    }
                ]
            },
            {
                path: '/develop',
                name: 'develop',
                meta: {
                    title: '开发',
                    icon: 'icow icow-qiehuan'
                },
                children: [
                    {
                        path: 'meun',
                        name: 'meun',
                        component: () => import('../views/develop/meun.vue'),
                        meta: {
                            title: '菜单配置'
                        },
                    },
                    {
                        path: 'setConfig',
                        name: 'setConfig',
                        component: () => import('../views/develop/setConfig.vue'),
                        meta: {
                            title: '菜单配置'
                        },
                    }
                ]
            },

        ]
    },
    {
        component: Layout,
        children: [
            {
                path: '/addDevice',
                name: 'addDevice',
                component: () => import('@/views/device/deviceAdd.vue'),
                meta: {
                    title: '添加设备'
                }
            }
        ]
    },
    // {
    //     component: Layout,
    //     children: [
    //         {
    //             path: '/lock',
    //             name: 'lock',
    //             component: () => import('../views/device/lock.vue'),
    //             meta: {
    //                 title: '门锁管理'
    //             }
    //         }
    //     ]
    // },
    {
        component: Layout,
        children: [
            {
                path: '/deviceEdit',
                name: 'deviceEdit',
                component: () => import('@/views/device/edit.vue'),
                meta: {
                    title: '设备编辑'
                }
            }
        ]
    },
    {
        component: Layout,
        children: [
            {
                path: '/deviceDetali',
                name: 'deviceDetali',
                component: () => import('@/views/device/deviceDetali.vue'),
                meta: {
                    title: '设备详情'
                }
            }
        ]
    },
    {
        component: Layout,
        children: [
            {
                path: '/deviceGoods',
                name: 'deviceGoods',
                component: () => import('../views/device/deviceGoods.vue'),
                meta: {
                    title: '售货机商品'
                }
            }
        ]
    },
    {
        component: Layout,
        children: [
            {
                path: '/goodsAdd',
                name: 'goodsAdd',
                component: () => import('../views/commodity/add.vue'),
                meta: {
                    title: '商品的添加'
                }
            }
        ]
    },
    {
        component: Layout,
        children: [
            {
                path: '/orderEdit',
                name: 'orderEdit',
                component: () => import('../views/order/orderEdit.vue'),
                meta: {
                    title: '订单详情'
                }
            }
        ]
    },
    // {
    //     component: Layout,
    //     children: [
    //         {
    //             path: '/roleSystem',
    //             name: 'roleSystem',
    //             component: () => import('../views/system/roleSystem.vue'),
    //             meta: {
    //                 title: '查看权限'
    //             }
    //         }
    //     ]
    // },
    // {
    //     component: Layout,
    //     children: [
    //         {
    //             path: '/visionImg',
    //             name: 'visionImg',
    //             component: () => import('../views/order/visionImg.vue'),
    //             meta: {
    //                 title: '视觉图片'
    //             }
    //         }
    //     ]
    // },
    {
        path: '/:pathMacth(.*)*',
        component: NotFound,
    }
]
export default routes

